package ar.com.ctrln.persistence.model.contratacion;

import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.Table;

import ar.com.ctrln.persistence.model.servicios.telefonia.Operador;

@Entity
@Table(name = "DETALLE_CONTRATO_TELEFONIA")
public class DetalleContratacionTelefonia extends DetalleContratacion {

	@Column
	private int clave;

	@Column
	private int nroTramas;

	@ManyToMany(cascade = { CascadeType.ALL }, fetch = FetchType.EAGER)
	@JoinTable(name = "OPERADOR_CONTRATACION", joinColumns = { @JoinColumn(name = "id_operador") }, inverseJoinColumns = { @JoinColumn(name = "id_detalle") })
	private Set<Operador> operadores;

	public void setClave(int clave) {
		this.clave = clave;
	}

	public int getClave() {
		return clave;
	}

	public void setNroTramas(int nroTramas) {
		this.nroTramas = nroTramas;
	}

	public int getNroTramas() {
		return nroTramas;
	}

	public void setOperadores(Set<Operador> operadores) {
		this.operadores = operadores;

	}

	public Set<Operador> getOperadores() {
		return operadores;
	}
}
